package com.nuanshui.heatedloan.web.credit;

import com.alibaba.dubbo.config.annotation.Reference;
import com.nuanshui.heatedloan.constant.GlobalParam;
import com.nuanshui.heatedloan.credit.facade.CustomerCreditAuditService;
import com.nuanshui.heatedloan.credit.model.AuditRequestParam;
import com.nuanshui.heatedloan.credit.request.ClosedDetailed;
import com.nuanshui.heatedloan.pageable.Pager;
import com.nuanshui.heatedloan.web.ApiController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wangxw on 2017/8/1.
 */

@RequestMapping("/cms/manage/historyover")
@RestController
public class CreditAuditHistoryController extends ApiController {

    @Reference(url= GlobalParam.CREDIT_DUBBO_SERVER,timeout= GlobalParam.DUBBO_SERVER_TIME_OUT,version = GlobalParam.CREDIT_DUBBO_SERVER_VERSION)
    private CustomerCreditAuditService customerCreditAuditService;

    @RequestMapping(value = "list",method = RequestMethod.POST)
    public String historyList(Pager<ClosedDetailed> pager, AuditRequestParam param){
        pager= customerCreditAuditService.getHistoryCreditAuditInfo(pager,param);
      return success(pager.asHashMap());
    }
}
